<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:74:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\nav\add.html";i:1493605322;}*/ ?>
<!--添加导航-->
<div class="dialog_content">
	<form id="info_form" action="<?php echo url('addDo'); ?>" method="post">
		<table width="100%" class="table_form">
			<tr>
				<th width="80">导航名称 :</th>
				<td>
					<input type="text" name="title" id="title" class="input-text" size="20">
				</td>
			</tr>
			<tr>
				<th>所属模型 :</th>
				<td>
					<label><input type="radio" name="model" onclick="radioDis('onepage','url');" value="pages" checked>单页面</label>
					<label><input type="radio" name="model" onclick="radioDis('url','onepage');" value="">链接地址</label>
				</td>
			</tr>
			<tr id="onepage">
				<th>绑定页面 :</th>
				<td>
					<select class="J_cate_select mr10" data-pid="0" data-uri="<?php echo url('OneCate/ajaxGetchilds'); ?>" data-selected=""></select>
					<input type="hidden" name="cate_id" id="J_cate_id" />
				</td>
			</tr>
			<tr id="url" style="display:none;">
				<th>链接地址 :</th>
				<td>
					<input type="text" class="input-text" size="40" name="url" placeholder="例：/loupan_0_0_52_0_0_0_0_0.html">
					<p>站内链接请不要带域名,站外链接请填写完整地址。</p>
				</td>
			</tr>
			<tr>
				<th>导航位置 :</th>
				<td>
					<label><input type="radio" name="pos" value="1">页头菜单</label>
					<label><input type="radio" name="pos" value="2" checked>页脚菜单</label>
				</td>
			</tr>
			<tr>
				<th>打开方式 :</th>
				<td>
					<label><input type="radio" name="open_type" value="_self" checked="checked">当前页面</label>&nbsp;&nbsp;
					<label><input type="radio" name="open_type" value="_blank">新页面</label>
				</td>
			</tr>
			<tr>
				<th>状态 :</th>
				<td>
					<label><input type="radio" name="status" value="1" checked="checked">启用</label>&nbsp;&nbsp;
					<label><input type="radio" name="status" value="0"> 禁用</label>
				</td>
			</tr>
			<tr>
				<th>SEO 标题 :</th>
				<td><input type="text" name="seo_title" id="seo_title" class="input-text" size="47"></td>
			</tr>
			<tr>
				<th>SEO 关键词 :</th>
				<td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="47"></td>
			</tr>
			<tr>
				<th>SEO 描述 :</th>
				<td><textarea name="seo_desc" style="width:340px; height:50px;"></textarea></td>
			</tr>
			<tr>
				<th></th>
				<td><span style="color:#ff0000;">注：{city}为变量请不要更改，前台会自动替换为用户所选择的城市。可设置多个{city}</span></td>
			</tr>
		</table>
	</form>
</div>
<script>
	$(function(){
		$('.J_cate_select').cate_select();
		$.formValidator.initConfig({formid:"info_form",autotip:true});
		$("#title").formValidator({onshow:'请填写名称',onfocus:'请填写名称'}).inputValidator({min:1,onerror:'请填写名称'});

		$('#info_form').ajaxForm({success:complate,dataType:'json'});
		function complate(result){
			if(result.status == 1){
				$.dialog.get(result.dialog).close();
				$.yingloujie.tip({content:result.msg});
				setTimeout(function(){window.location.reload();},1000);
			} else {
				$.yingloujie.tip({content:result.msg, icon:'alert'});
			}
		}
	});
	function radioDis(show,hide){
		$('#'+show).show();
		$('#'+hide).hide();
	}
</script>